<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The SplFileObject class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="splfileinfo.tostring.html">SplFileInfo::__toString</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="splfileobject.construct.html">SplFileObject::__construct</a></div>
 <div class="up"><a href="spl.files.html">文件处理</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.splfileobject" class="reference">

 <h1 class="title">The SplFileObject class</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.1.0)</p>


  <div class="section" id="splfileobject.intro">
   <h2 class="title">简介</h2>
   <p class="para"> 
    SplFileObject类为文件提供了一个面向对象接口.
   </p>
  </div>


  <div class="section" id="splfileobject.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">SplFileObject</strong>
     </span>
     
     <span class="ooclass">
      <span class="modifier">extends</span>
      <a href="class.splfileinfo.html" class="classname">SplFileInfo</a>
     </span>
     
     <span class="oointerface">implements 
      <span class="interfacename"><a href="class.recursiveiterator.html" class="interfacename">RecursiveIterator</a></span>
     </span>

     <span class="oointerface">, 
      <span class="interfacename"><a href="class.seekableiterator.html" class="interfacename">SeekableIterator</a></span>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.splfileobject.html#splfileobject.constants.drop-new-line"><var class="varname">DROP_NEW_LINE</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.splfileobject.html#splfileobject.constants.read-ahead"><var class="varname">READ_AHEAD</var></a></var>
     <span class="initializer"> = 2</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.splfileobject.html#splfileobject.constants.skip-empty"><var class="varname">SKIP_EMPTY</var></a></var>
     <span class="initializer"> = 4</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.splfileobject.html#splfileobject.constants.read-csv"><var class="varname">READ_CSV</var></a></var>
     <span class="initializer"> = 8</span>
    ;</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="splfileobject.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$open_mode</code><span class="initializer"> = &quot;r&quot;</span></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$use_include_path</code><span class="initializer"> = false</span></span>
   [, <span class="methodparam"><span class="type">resource</span> <code class="parameter">$context</code></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string|array</span><span class="methodname"><a href="splfileobject.current.html" class="methodname">current</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.eof.html" class="methodname">eof</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.fflush.html" class="methodname">fflush</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileobject.fgetc.html" class="methodname">fgetc</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="splfileobject.fgetcsv.html" class="methodname">fgetcsv</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$delimiter</code><span class="initializer"> = &quot;,&quot;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$enclosure</code><span class="initializer"> = &quot;\&quot;&quot;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$escape</code><span class="initializer"> = &quot;\\&quot;</span></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileobject.fgets.html" class="methodname">fgets</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileobject.fgetss.html" class="methodname">fgetss</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$allowable_tags</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.flock.html" class="methodname">flock</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$operation</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter reference">&$wouldblock</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.fpassthru.html" class="methodname">fpassthru</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.fputcsv.html" class="methodname">fputcsv</a></span>
    ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$fields</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$delimiter</code><span class="initializer"> = &#039;,&#039;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$enclosure</code><span class="initializer"> = &#039;&quot;&#039;</span></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="splfileobject.fscanf.html" class="methodname">fscanf</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$format</code></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter reference">&$...</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.fseek.html" class="methodname">fseek</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$whence</code><span class="initializer"> = SEEK_SET</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="splfileobject.fstat.html" class="methodname">fstat</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.ftell.html" class="methodname">ftell</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.ftruncate.html" class="methodname">ftruncate</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$size</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.fwrite.html" class="methodname">fwrite</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$str</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$length</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.getchildren.html" class="methodname">getChildren</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="splfileobject.getcsvcontrol.html" class="methodname">getCsvControl</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.getflags.html" class="methodname">getFlags</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.getmaxlinelen.html" class="methodname">getMaxLineLen</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.haschildren.html" class="methodname">hasChildren</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.key.html" class="methodname">key</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.next.html" class="methodname">next</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.rewind.html" class="methodname">rewind</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.seek.html" class="methodname">seek</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$line_pos</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.setcsvcontrol.html" class="methodname">setCsvControl</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$delimiter</code><span class="initializer"> = &quot;,&quot;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$enclosure</code><span class="initializer"> = &quot;\&quot;&quot;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$escape</code><span class="initializer"> = &quot;\\&quot;</span></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.setflags.html" class="methodname">setFlags</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.setmaxlinelen.html" class="methodname">setMaxLineLen</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$max_len</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.tostring.html" class="methodname">__toString</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.valid.html" class="methodname">valid</a></span>
    ( <span class="methodparam">void</span>
   )</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="splfileinfo.construct.html" class="methodname">SplFileInfo::__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$file_name</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileinfo.getatime.html" class="methodname">SplFileInfo::getATime</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileinfo.getbasename.html" class="methodname">SplFileInfo::getBasename</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$suffix</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileinfo.getctime.html" class="methodname">SplFileInfo::getCTime</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileinfo.getextension.html" class="methodname">SplFileInfo::getExtension</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">SplFileInfo</span><span class="methodname"><a href="splfileinfo.getfileinfo.html" class="methodname">SplFileInfo::getFileInfo</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$class_name</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileinfo.getfilename.html" class="methodname">SplFileInfo::getFilename</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileinfo.getgroup.html" class="methodname">SplFileInfo::getGroup</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileinfo.getinode.html" class="methodname">SplFileInfo::getInode</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileinfo.getlinktarget.html" class="methodname">SplFileInfo::getLinkTarget</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileinfo.getmtime.html" class="methodname">SplFileInfo::getMTime</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileinfo.getowner.html" class="methodname">SplFileInfo::getOwner</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileinfo.getpath.html" class="methodname">SplFileInfo::getPath</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">SplFileInfo</span><span class="methodname"><a href="splfileinfo.getpathinfo.html" class="methodname">SplFileInfo::getPathInfo</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$class_name</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileinfo.getpathname.html" class="methodname">SplFileInfo::getPathname</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileinfo.getperms.html" class="methodname">SplFileInfo::getPerms</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileinfo.getrealpath.html" class="methodname">SplFileInfo::getRealPath</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileinfo.getsize.html" class="methodname">SplFileInfo::getSize</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileinfo.gettype.html" class="methodname">SplFileInfo::getType</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileinfo.isdir.html" class="methodname">SplFileInfo::isDir</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileinfo.isexecutable.html" class="methodname">SplFileInfo::isExecutable</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileinfo.isfile.html" class="methodname">SplFileInfo::isFile</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileinfo.islink.html" class="methodname">SplFileInfo::isLink</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileinfo.isreadable.html" class="methodname">SplFileInfo::isReadable</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileinfo.iswritable.html" class="methodname">SplFileInfo::isWritable</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">SplFileObject</span><span class="methodname"><a href="splfileinfo.openfile.html" class="methodname">SplFileInfo::openFile</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$open_mode</code><span class="initializer"> = r</span></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$use_include_path</code><span class="initializer"> = false</span></span>
   [, <span class="methodparam"><span class="type">resource</span> <code class="parameter">$context</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileinfo.setfileclass.html" class="methodname">SplFileInfo::setFileClass</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$class_name</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileinfo.setinfoclass.html" class="methodname">SplFileInfo::setInfoClass</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$class_name</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileinfo.tostring.html" class="methodname">SplFileInfo::__toString</a></span>
    ( <span class="methodparam">void</span>
   )</div>


   }</div>


  </div>
  

  <div class="section" id="splfileobject.constants">
   <h2 class="title">预定义常量</h2>
   <dl>

    
     <dt id="splfileobject.constants.drop-new-line"><strong><code>SplFileObject::DROP_NEW_LINE</code></strong></dt>

     <dd>

      <p class="para">Drop newlines at the end of a line.</p>
     </dd>

    
    
     <dt id="splfileobject.constants.read-ahead"><strong><code>SplFileObject::READ_AHEAD</code></strong></dt>

     <dd>

      <p class="para">Read on rewind/next.</p>
     </dd>

    
    
     <dt id="splfileobject.constants.skip-empty"><strong><code>SplFileObject::SKIP_EMPTY</code></strong></dt>

     <dd>

      <p class="para">Skips empty lines in the file. This requires the <strong><code>READ_AHEAD</code></strong> flag be enabled, to work as expected.</p>
     </dd>

    
    
     <dt id="splfileobject.constants.read-csv"><strong><code>SplFileObject::READ_CSV</code></strong></dt>

     <dd>

      <p class="para">Read lines as CSV rows.</p>
     </dd>

    
   </dl>

  </div>


 <div class="section">
  <h2 class="title">更新日志</h2>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.3.9</td>
       <td>
        <strong><code>SplFileObject::SKIP_EMPTY</code></strong> value changed to 4.
        Previously, value was 6.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 </div>

 

































































































































































































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="splfileobject.construct.html">SplFileObject::__construct</a> — Construct a new file object.</li><li><a href="splfileobject.current.html">SplFileObject::current</a> — Retrieve current line of file</li><li><a href="splfileobject.eof.html">SplFileObject::eof</a> — Reached end of file</li><li><a href="splfileobject.fflush.html">SplFileObject::fflush</a> — Flushes the output to the file</li><li><a href="splfileobject.fgetc.html">SplFileObject::fgetc</a> — Gets character from file</li><li><a href="splfileobject.fgetcsv.html">SplFileObject::fgetcsv</a> — Gets line from file and parse as CSV fields</li><li><a href="splfileobject.fgets.html">SplFileObject::fgets</a> — Gets line from file</li><li><a href="splfileobject.fgetss.html">SplFileObject::fgetss</a> — Gets line from file and strip HTML tags</li><li><a href="splfileobject.flock.html">SplFileObject::flock</a> — Portable file locking</li><li><a href="splfileobject.fpassthru.html">SplFileObject::fpassthru</a> — Output all remaining data on a file pointer</li><li><a href="splfileobject.fputcsv.html">SplFileObject::fputcsv</a> — Write a field array as a CSV line</li><li><a href="splfileobject.fscanf.html">SplFileObject::fscanf</a> — Parses input from file according to a format</li><li><a href="splfileobject.fseek.html">SplFileObject::fseek</a> — Seek to a position</li><li><a href="splfileobject.fstat.html">SplFileObject::fstat</a> — Gets information about the file</li><li><a href="splfileobject.ftell.html">SplFileObject::ftell</a> — Return current file position</li><li><a href="splfileobject.ftruncate.html">SplFileObject::ftruncate</a> — Truncates the file to a given length</li><li><a href="splfileobject.fwrite.html">SplFileObject::fwrite</a> — Write to file</li><li><a href="splfileobject.getchildren.html">SplFileObject::getChildren</a> — No purpose</li><li><a href="splfileobject.getcsvcontrol.html">SplFileObject::getCsvControl</a> — Get the delimiter and enclosure character for CSV</li><li><a href="splfileobject.getcurrentline.html">SplFileObject::getCurrentLine</a> — Alias of SplFileObject::fgets</li><li><a href="splfileobject.getflags.html">SplFileObject::getFlags</a> — Gets flags for the SplFileObject</li><li><a href="splfileobject.getmaxlinelen.html">SplFileObject::getMaxLineLen</a> — Get maximum line length</li><li><a href="splfileobject.haschildren.html">SplFileObject::hasChildren</a> — SplFileObject does not have children</li><li><a href="splfileobject.key.html">SplFileObject::key</a> — Get line number</li><li><a href="splfileobject.next.html">SplFileObject::next</a> — Read next line</li><li><a href="splfileobject.rewind.html">SplFileObject::rewind</a> — Rewind the file to the first line</li><li><a href="splfileobject.seek.html">SplFileObject::seek</a> — Seek to specified line</li><li><a href="splfileobject.setcsvcontrol.html">SplFileObject::setCsvControl</a> — Set the delimiter and enclosure character for CSV</li><li><a href="splfileobject.setflags.html">SplFileObject::setFlags</a> — Sets flags for the SplFileObject</li><li><a href="splfileobject.setmaxlinelen.html">SplFileObject::setMaxLineLen</a> — Set maximum line length</li><li><a href="splfileobject.tostring.html">SplFileObject::__toString</a> — Alias of SplFileObject::current</li><li><a href="splfileobject.valid.html">SplFileObject::valid</a> — Not at EOF</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="splfileinfo.tostring.html">SplFileInfo::__toString</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="splfileobject.construct.html">SplFileObject::__construct</a></div>
 <div class="up"><a href="spl.files.html">文件处理</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
